package dao

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Tel      string `json:"tel" gorm:"type:char(11);not null;unique;comment:'手机号'"`
	UserName string `json:"userName" gorm:"type:varchar(30);not null;comment:'用户名'"`
	Password string `json:"password" gorm:"type:char(32);not null;comment:'密码'"`
	Status   int    `json:"status" gorm:"tinyint(1);not null;default:1;comment:'1-在线2-下线3-冻结'"`
}

type RealName struct {
	gorm.Model
	UserId    int    `json:"userId" gorm:"int(10);not null;comment:'用户编号'"`
	RealNames string `json:"realNames" gorm:"type:varchar(20);not null;comment:'真实姓名'"`
	IdCard    string `json:"idCard" gorm:"type:char(18);not null;comment:'身份证号码'"`
}

type Address struct {
	gorm.Model
	UserId   int    `json:"userId" gorm:"type:int(10);not null;comment:'用户编号'"`
	Province string `json:"province" gorm:"type:varchar(50);default:北京;comment:'省份/直辖市/自治州''"`
	City     string `json:"city" gorm:"type:varchar(20);default:北京;comment:'城市'"`
	Where    string `json:"where" gorm:"type:varchar(200);default:北京天安门;comment:'具体地址'"`
}

type UserMessage struct {
	gorm.Model
	UserId    int    `json:"userId" gorm:"int(10);not null;comment:'用户编号'"`
	AddressId int    `json:"addressId" gorm:"int(10);not null;comment:'用户来自哪里'"`
	Sex       string `json:"sex" gorm:"type:varchar(10);default:保密;comment:'用户性别'"`
	Signature string `json:"signature" gorm:"type:text;default:保密;comment:'个性签名'"`
}
